package com.example.demo.config.service;

import java.time.LocalDateTime;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;

/**
 * @author yongen
 * @description: 消费服务接口
 * @date 2022/2/9 3:06 PM
 */
public interface RocketMQConsumerService {
  /**
   * 前置
   *
   * @param message
   * @return
   */
  ConsumeConcurrentlyStatus beforeHandler(String message);
  /**
   * 消息处理
   *
   * @param message
   * @return
   */
  ConsumeConcurrentlyStatus handle(String message);
  /**
   * 后置
   *
   * @param message
   * @param startHandlerTime
   * @param status
   */
  void afterHandler(String message, LocalDateTime startHandlerTime, ConsumeConcurrentlyStatus status);
}
